fstats_msa Module

Provides routines supporting measurement systems analysis (MSA).



Variables

Type Visibility Attributes Name Initial
integer(kind=int32), public, parameter :: GAUGE_RR_CROSSED_STUDY = 2000

Indicates a crossed study, wherein every operator measures every part.

integer(kind=int32), public, parameter :: GAUGE_RR_EXPANDED_STUDY = 2002

Indicates an expanded study, wherein a third factor is considered alongside the part and operator factors.

integer(kind=int32), public, parameter :: GAUGE_RR_NESTED_STUDY = 2001

Indicates a nested study, wherein each operator measures a distinct set of parts.


Interfaces

public interface gauge_rr

Performs a gauge repeatability and reproducibility (gauge R&R) study by means of the analysis of variance (ANOVA) method.

A gauge R&R study apportions the observed variation between the parts being measured and the measurement system itself. The measurement system contribution is split into repeatability, the variation seen when one operator measures one part repeatedly, and reproducibility, the variation seen between operators. Three study designs are supported.

Crossed

Every operator measures every part, and each combination is measured repeatedly. Because each part is seen by every operator, the operator-by-part interaction can be separated from the residual, and the measurements are described by where is the part effect, the operator effect, their interaction, and the residual. The interaction describes the tendency of operators to differ from one another by differing amounts from part to part, and it contributes to reproducibility. This is the appropriate design whenever the measurement is non-destructive, and it is the design assumed by default. Supply an M-by-P-by-O array and, optionally, GAUGE_RR_CROSSED_STUDY.

Nested

Each operator measures its own distinct set of parts, so no part is shared between operators. This is the appropriate design when the measurement destroys or alters the part, or when the parts cannot otherwise be circulated. Since no part is common to two operators there is no information with which to separate an interaction from the part effect, and the parts are said to be nested within the operators where denotes the effect of the i-th part measured by the j-th operator. Reproducibility is therefore the operator term alone. Supply an M-by-P-by-O array together with GAUGE_RR_NESTED_STUDY; the P parts measured by one operator are understood to be different from those measured by any other.

Expanded

A third factor, such as the day, the setup, the fixture, or the measurement site, is varied alongside the parts and the operators in a fully crossed arrangement. All two-way interactions and the three-way interaction are estimated where is the third factor. This design answers whether the measurement system is stable with respect to an influence that a conventional study would leave confounded with the repeatability. Every term other than the part term describes variation introduced by the measurement system, so all of them contribute to reproducibility. Supply an M-by-P-by-O-by-C array; the study type follows from the rank of the argument.

  • private function gauge_rr_2_factor(x, study, tolerance, alpha, multiplier) result(rst)

    Performs a crossed or nested gauge repeatability and reproducibility study. See the gauge_rr interface for a description of the designs.

    The variance of each term is estimated from the corresponding mean squares. In a crossed study, if the operator-by-part interaction is found to be insignificant it is pooled into the repeatability term and the remaining components are re-estimated from the pooled residual. Any variance estimate that would otherwise be negative is taken as zero.

    See Also

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:,:,:) :: x

    An M-by-P-by-O array containing the M replicate measurements of each of the P parts, taken by each of the O operators. In a nested study the P parts measured by each operator are distinct from those measured by any other. At least two replicates, two parts, and two operators are required.

    integer(kind=int32), intent(in), optional :: study

    An optional input specifying the design, either GAUGE_RR_CROSSED_STUDY or GAUGE_RR_NESTED_STUDY. The default is a crossed study.

    real(kind=real64), intent(in), optional :: tolerance

    An optional input specifying the width of the tolerance range of the characteristic being measured. If supplied, the study variation of each component is additionally expressed as a percentage of this value.

    real(kind=real64), intent(in), optional :: alpha

    An optional input specifying the significance level above which the operator-by-part interaction is considered insignificant and is pooled into the repeatability. The default is 0.25. A value of 1 retains the interaction unconditionally, and a value of 0 pools it unconditionally. The term is ignored by a nested study, which has no interaction.

    real(kind=real64), intent(in), optional :: multiplier

    An optional input specifying the number of standard deviations spanned by the study variation. The default is 6, which captures 99.73% of a normally distributed population.

    Return Value type(gauge_rr_results)

    The results of the study.

  • private function gauge_rr_3_factor(x, tolerance, alpha, multiplier) result(rst)

    Performs an expanded gauge repeatability and reproducibility study, in which a third factor is crossed with the parts and the operators. See the gauge_rr interface for a description of the design.

    If the three-way interaction is found to be insignificant it is pooled into the repeatability term, and the remaining components are re-estimated from the pooled residual. Any variance estimate that would otherwise be negative is taken as zero.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:,:,:,:) :: x

    An M-by-P-by-O-by-C array containing the M replicate measurements of each of the P parts, taken by each of the O operators, at each of the C levels of the third factor. At least two of each are required.

    real(kind=real64), intent(in), optional :: tolerance

    An optional input specifying the width of the tolerance range of the characteristic being measured. If supplied, the study variation of each component is additionally expressed as a percentage of this value.

    real(kind=real64), intent(in), optional :: alpha

    An optional input specifying the significance level above which the three-way interaction is considered insignificant and is pooled into the repeatability. The default is 0.25. A value of 1 retains the interaction unconditionally, and a value of 0 pools it unconditionally.

    real(kind=real64), intent(in), optional :: multiplier

    An optional input specifying the number of standard deviations spanned by the study variation. The default is 6, which captures 99.73% of a normally distributed population.

    Return Value type(gauge_rr_results)

    The results of the study.


Derived Types

type, public ::  gauge_rr_anova_table

The analysis of variance table underlying a gauge R&R study. Terms that do not appear in the study design are zeroed.

Components

Type Visibility Attributes Name Initial
type(anova_factor), public :: operator

The operator term.

type(anova_factor), public :: operator_by_part

The operator-by-part interaction.

real(kind=real64), public :: overall_mean

The mean of all of the measurements.

type(anova_factor), public :: part

The part term. In a nested study this term describes the parts within the operators.

type(anova_factor), public :: residual

The residual, or repeatability, term.

type(anova_factor), public :: third_factor

The third factor term of an expanded study.

type(anova_factor), public :: third_factor_by_operator

The third-factor-by-operator interaction of an expanded study.

type(anova_factor), public :: third_factor_by_part

The third-factor-by-part interaction of an expanded study.

type(anova_factor), public :: three_way

The three-way interaction of an expanded study.

real(kind=real64), public :: total_dof

The total number of degrees of freedom.

real(kind=real64), public :: total_sum_of_squares

The total sum of squares.

type, public ::  gauge_rr_component

Describes a single variance component of a gauge repeatability and reproducibility study.

Components

Type Visibility Attributes Name Initial
real(kind=real64), public :: percent_contribution

The variance of the component expressed as a percentage of the total variance. The contributions of the components sum to 100.

real(kind=real64), public :: percent_study_variation

The study variation of the component expressed as a percentage of the total study variation. As the study variation is proportional to a standard deviation rather than a variance, these percentages do not sum to 100.

real(kind=real64), public :: percent_tolerance

The study variation of the component expressed as a percentage of the tolerance range. This term is only meaningful if a tolerance was supplied; else, it is zero.

real(kind=real64), public :: standard_deviation

The estimated standard deviation of the component.

real(kind=real64), public :: variance

The estimated variance of the component.

type, public ::  gauge_rr_results

Contains the results of a gauge repeatability and reproducibility study.

Components

Type Visibility Attributes Name Initial
type(gauge_rr_anova_table), public :: anova_table

The ANOVA table from which the variance components were derived.

integer(kind=int32), public :: distinct_categories

The number of distinct categories the measurement system is able to resolve. A value of 5 or more is generally considered acceptable.

type(gauge_rr_component), public :: gauge_rr

The combined repeatability and reproducibility.

logical, public :: interaction_pooled

True if the highest-order interaction was found to be insignificant and was pooled into the repeatability term. A nested study has no interaction, so this term is always false.

real(kind=real64), public :: interaction_probability

The probability associated with the highest-order interaction, upon which the pooling decision was based.

type(gauge_rr_component), public :: operator_by_part

The operator-by-part interaction alone. This term is zero for a nested study, and zero for a crossed study in which the interaction was pooled into the repeatability.

type(gauge_rr_component), public :: operator_variation

The operator term alone.

type(gauge_rr_component), public :: part_variation

The part-to-part variation.

type(gauge_rr_component), public :: repeatability

The equipment variation, being the variation observed when a single operator measures a single part repeatedly.

type(gauge_rr_component), public :: reproducibility

The appraiser variation, being the combination of every term other than the part term and the repeatability.

real(kind=real64), public :: study_multiplier

The multiplier used to convert a standard deviation into a study variation.

integer(kind=int32), public :: study_type

The design that was analyzed; one of GAUGE_RR_CROSSED_STUDY, GAUGE_RR_NESTED_STUDY, or GAUGE_RR_EXPANDED_STUDY.

type(gauge_rr_component), public :: third_factor_by_operator

The third-factor-by-operator interaction alone. This term is zero unless the study was expanded.

type(gauge_rr_component), public :: third_factor_by_part

The third-factor-by-part interaction alone. This term is zero unless the study was expanded.

type(gauge_rr_component), public :: third_factor_variation

The third factor term alone. This term is zero unless the study was expanded.

type(gauge_rr_component), public :: three_way_interaction

The three-way interaction alone. This term is zero unless the study was expanded, and zero if it was pooled into the repeatability.

type(gauge_rr_component), public :: total_variation

The total variation.